@RikiArgumentImport()
import 'package:example_package/arg/package1arg.dart';
import 'package:example_package/router/example_package_routes.dart';
import 'package:example_package/util/widget_util.dart';
@RikiArgumentImport()
import 'package:flutter/material.dart';
import 'package:riki_router/riki_router.dart';

@RikiRoute(
  name: '/package/1',
  routeName: 'package页面',
  pageRouteType: PageRouteType.cupertino,
)
class Package1Page extends StatelessWidget {
  final Package1Arg arg;
  const Package1Page({Key? key,required this.arg}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    RikiPage? route = RikiRouterDelegate.of(context).find(this);
    return Scaffold(
      appBar: buildAppBar('PACKAGE 1'),
      body: ListView(
        children: [
          Container(
            alignment: Alignment.center,
            height: 44,
            child: Text(route?.routeName ?? ''),
          ),
          buildListTile('跳转PACKAGE 2', () {
            RikiRouterDelegate.of(context).pushNamed(RikiRoutes.package2.name);
          }),
        ],
      ),
    );
  }
}
